<table class="table table-bordered table-stripped">
    <thead>
    <th scope="col">AIRCRAFT_ID</th>
    <th scope="col">AIRLINES_CODE2</th>
    <th scope="col">AIRCRAFT_TYPE</th>
    <th scope="col">&nbsp;</th>
    </thead>
#{list items:_items, as:'item' }
%{
    code2 = item.airlines==null ? null : item.airlines.getCode2() ;
    aitrcraft_type = item.getAircraft_type()==null ? null : item.getAircraft_type().getAircraft_type();
}%
    <tr>
        <th scope="row">${item.getAircraft_id()}</th>
        <td>#{if item.airlines}
            <a href="@{controllers.Aircraft.index(null,null,code2)}">${code2}</a>
            #{/if}
            #{if item.airlines==null}
            &nbsp;
            #{/if}
        </td>
        <td>#{if item.airlines}
            <a href="@{controllers.Aircraft.index(null,aitrcraft_type, code2)}">${aitrcraft_type}</a>
            #{/if}
            #{if item.airlines==null}
                &nbsp;
            #{/if}
        </td>
        <td><a href="@{controllers.Aircraft.edit(item.getId())}">编辑</a></td>
    </tr>
#{/list}
</table>